package sumoTween.demo.swing.scroll;

import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.JFrame;

public class DemoWindow extends JFrame{

	public DemoWindow()
	{
		DemoComponent demo=new DemoComponent();
		demo.setBounds(0, 0, 640,480);

		this.setLayout(null);
		this.add(demo);
		
		this.setBounds(0, 0, 640, 480);
		this.setVisible(true);
		this.setTitle("sumoTween scroll demo");

        this.addWindowListener(new WindowListener() 
        {	
			public void windowOpened(WindowEvent e) {}
			public void windowIconified(WindowEvent e) {}
			public void windowDeiconified(WindowEvent e) {}
			public void windowDeactivated(WindowEvent e) {}
			public void windowClosed(WindowEvent e) {}
			public void windowActivated(WindowEvent e) {}
			public void windowClosing(WindowEvent e) 
			{
				System.exit(0);
			}
		});
		
    	boolean running=true;
		while(running)
		{
			try 
			{
				Thread.sleep(20);
			} 
			catch (Exception e) {}

			repaint();
		}
		
	}
	
	
}
